package com.leon.androidcoursedesign.ui.fragments.mainFragments;

import android.content.Intent;
import android.view.View;

import com.leon.androidcoursedesign.R;
import com.leon.androidcoursedesign.ui.activitys.toolBoxActivity.CalActivity;
import com.leon.androidcoursedesign.ui.activitys.toolBoxActivity.MusicActivity;
import com.leon.androidcoursedesign.ui.activitys.toolBoxActivity.NoteActivity;
import com.leon.androidcoursedesign.ui.fragments.baseFragment.BaseFragment;
import com.leon.androidcoursedesign.ui.fragments.baseFragment.BindingUtils;

public class ToolBoxFragment extends BaseFragment implements View.OnClickListener {

    @Override
    public int setLayout() {
        return R.layout.home_fragment_tool_box;
    }

    @Override
    public void init() {
    }

    @Override
    public void initView(BindingUtils bindingUtils) {
        bindingUtils
                .setOnClickListener(R.id.tool_box_imageView_music, this)
                .setOnClickListener(R.id.tool_box_imageView_note, this)
                .setOnClickListener(R.id.tool_box_imageView_cal, this);
    }
    @Override
    public void initValues() {

    }

    @Override
    public void onClick(View v) {
        Intent intent = new Intent();

        switch (v.getId()) {
            case R.id.tool_box_imageView_music:
                intent = new Intent(context, MusicActivity.class);
                break;
            case R.id.tool_box_imageView_note:
                intent = new Intent(context, NoteActivity.class);
                break;
            case R.id.tool_box_imageView_cal:
                intent = new Intent(context, CalActivity.class);
                break;
            default:
                break;
        }

        startActivity(intent);
    }
}
